-
Notifications
You must be signed in to change notification settings - Fork 12
feat: add tools to interact with the app #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds a suite of Appium interaction tools and integrates them into the MCP server, updates locator logic to return a single suggestion, and stubs out ID validation.
- Introduces
appium_find_element,appium_click,appium_set_value,appium_get_text, andappium_screenshottools - Registers new tools (and a test generation helper) in
src/tools/index.ts - Updates locator generator to return only the top suggestion and adds a placeholder ID checker
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils.ts | Stubbed out checkIsValidElementId with always-true |
| src/tools/interactions/click.ts | Adds click tool; function name mismatches export |
| src/tools/interactions/setValue.ts | Adds set-value tool |
| src/tools/interactions/getText.ts | Adds get-text tool |
| src/tools/interactions/screenshot.ts | Adds screenshot tool without parameters schema |
| src/tools/interactions/find.ts | Adds find-element tool |
| src/tools/index.ts | Registers all new tools |
| src/tools/generate-tests.ts | Adds test-generation instructions with typos |
| src/locators/locator-generation.ts | Returns only the first locator suggestion |
| examples/android-todo-app.md | Example doc with grammatical issues |
Comments suppressed due to low confidence (4)
src/tools/interactions/click.ts:7
- The function is named
generateTestbut implements a click tool. Rename it toclickElement(or similar) to match the tool's purpose and default export.
export default function generateTest(server: FastMCP): void {
src/tools/interactions/screenshot.ts:6
- This tool has no
parametersschema defined, which may lead to unexpected invocation errors. Consider addingparameters: z.object({})for clarity.
server.addTool({
examples/android-todo-app.md:1
- [nitpick] The sentence is unclear and missing articles. Consider rephrasing to: 'Use the Appium generate-test tool to create an automation test for the following steps:'
Using appium generate test tool create automation test for below step
src/locators/locator-generation.ts:209
- Changing from returning all sorted locators to only the first removes fallback options. If this is intentional, update function name or document the behavior; otherwise revert.
return [sortedLocators[0]];
| // 'Given id is not a valid element id. Call find_element_tool to fetch the correct uuid of the element' | ||
| // ); | ||
| // } | ||
| return true; |
Copilot
AI
Jun 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Validation logic in checkIsValidElementId is commented out, so all IDs pass. Consider re-enabling or removing the stubbed code to ensure proper UUID validation.
Co-authored-by: Copilot <[email protected]>
No description provided.